package com.usian.admin.controller.v1;

import com.usian.admin.service.IAdUserService;
import com.usian.apis.admin.LoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 管理员用户信息表 前端控制器
 * </p>
 *
 * @author usian
 * @since 2022-07-04
 */
@RestController
@RequestMapping("/login")
@CrossOrigin
public class LoginController implements LoginControllerApi {

    @Autowired
    private IAdUserService adUserService;

    @PostMapping("/in")
    @Override
    public ResponseResult login(@RequestBody AdUserDto adUserDto) {
        return  adUserService.login(adUserDto);
    }
}
